package com.nuanshui.heatedloan.module.features;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.nuanshui.heatedloan.baseservice.service.CommonServiceImpl;
import com.nuanshui.framework.res.ResourceFacade;
import com.nuanshui.heatedloan.constant.TransactionManagerType;
import com.nuanshui.heatedloan.module.model.Feature;
import com.nuanshui.heatedloan.module.model.FeatureForm;

@Service
@Transactional(readOnly = true,value=TransactionManagerType.MODULE_TRANSACTION_MANAGER)
public class BaseFeature extends CommonServiceImpl implements IModuleFeature {

	@Autowired
	protected ResourceFacade resourceFacade;
	

	protected FeatureForm form;
	
	public FeatureForm getForm() {
		return form;
	}

	public Feature getItem() {
		return form.getItem();
	}

	@Override
	public void handleFeature(FeatureForm form) {
		this.form=form;
		internalHandleFeature();
	}
	
	@Override
	public int getModuleId()
	{
		return 0;
	}
	
	protected void internalHandleFeature() {
		
	}
	
		
	@Override
	public boolean supportFeatureId(Integer id)
	{
		return false;
	}
}
